#include"Core.h"

Core::Core(int length, int height,int width, double es, double is, double os) {
	coordinate.h = height;
	coordinate.w = width;
	coordinate.l = length;
	executionSpeed = es;
	inputSpeed = is;
	outputSpeed = os;
	applicationId = -1;
	taskId = -1;
}

void Core::turnOn(int aId, int tId) {
	applicationId = aId;
	taskId = tId;
}

void Core::turnOff() {
	applicationId = -1;
	taskId = -1;
}

bool Core::checkState() {
	if (applicationId >= 0) {
		return true;
	}
	return false;
}

Vertex Core::getCoordinate()
{
	return coordinate;
}

int Core::getApplicationId() {
	return applicationId;
}

double Core::getExecutionSpeed() {
	return executionSpeed;
}

double Core::getInputSpeed() {
	return inputSpeed;
}

double Core::getOutputSpeed()
{
	return outputSpeed;
}
